Repository navigation
[WONTFIX?] Square a standing player's feet up after 3 s - #2243
Draft
sunzenshen wants to merge 1 commit into
Draft
sunzenshen wants to merge 1 commit into
sunzenshen wants to merge 1 commit into
Conversation
A standing player who turned to the side stayed twisted between eyes and feet, up to 90 degrees, until moving or leaning. Classic NEOTOKYO and the 2006 SDK base turn the feet to the eyes once they have not turned for mp_facefronttime (3 s). Use the same rule with the base's existing cvar and neo's existing feet turn time.
Contributor
Author
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Case 3: standing players stay twisted.
Review page: exported review page (Dropbox) · live review page (opening it lets you request access with your email or Claude account).
A standing player who looks to the side stays twisted between eyes and feet, up to 90 degrees, until moving or leaning:
ComputePoseParam_AimYawmoves the feet of a standing player only when the twist passes 90 degrees, and then by a fixed 90. Classic NEOTOKYO squares the feet up to the eyes once they have not turned for 3 s (mp_facefronttime, the 2006 SDK base's face-front timer), so a player standing still faces where they look.This PR adds that one rule to the standing branch: when the feet have not turned for
mp_facefronttimeseconds, their goal is the eye yaw, and they turn there through the existing convergence (720 deg/s, the same asmp_feetyawrate). Nothing new is defined:mp_facefronttimeis the 2006 base's cvar, already compiled into neo (base_playeranimstate.cpp) and declared but unused inmultiplayer_animstate.cpp; the feet turn time is neo's existingm_flLastAimTurnTime. +10 lines, all inhl2mp_playeranimstate.cpp(anexternand a three-lineelse if, each under#ifdef NEO, and a comment). The base's ownComputePoseParam_BodyYawcannot be called here, sinceCMultiPlayerAnimStatedoes not derive fromCBasePlayerAnimState.Moving, leaning (#1955) and the 90-degree limit keep their branches, which run first. The
m_bForceAimYaw("prone and undeployed") branch is never set in neo and is untouched.Independent of the other animation PRs from the review page. #2241 (case 1) changes the moving test at the top of the same function to horizontal speed; the two merge without conflict (trial merge of this branch with #2240, #2241 and the sprint-legs PR checked).
How this was compared
The code came first: neo's
ComputePoseParam_AimYawagainst the 2006 base classic is built on (base_playeranimstate.cpp:808-887), and classic'sclient.dllread for its version (ComputePoseParam_BodyYaw: the same face-front branch, reading themp_facefronttimecvar, default 3). Then per-frame animation logs from both games (classic'scl_showanimstate_log, neo's harness log) on the same map (nt_rise_ctg), spot, camera, class and weapon (NSF Assault bot with the MPN, onbot_mimic 1, its eyes turned bybot_mimic_yaw_offsetkeys), with the same scripted keys, read by the same scripts. Then side-by-side clips. Numbers come from the logs, not from watching.How to test
Results
Same scripted pass as the review page (the bot's eyes turn 30 degrees at 3 s, 90 more at 9 s, back 120 at 13 s; lean at 16 s). neo: Release builds of master (f426c22) and this PR; twist =
body_yaw.A longer pass on this PR (8 s between turns, one turn while crouched): every twist left standing or crouched was squared up 3.1-3.4 s after the last feet turn, in 0.17-0.28 s, to within 2 degrees.
Bots (10 on
ntre_rise_ctg, chase camera cycling through them, 120 s): of the frames where a bot stood still, master showed a twist over 20 degrees in 22%, held up to 5.6 s; this PR 9%, held up to 0.8 s.Unchanged, checked on the same pass: crouch and stand timing, jumps, fire and reload gestures, upper-body weights while walking, crouch walking and running, leaning (feet follow the eyes at the lean in both builds). A Debug client with 10 bots on
ntre_rise_ctg(90 s) logged only the knownneo_root.cpp (378) localizedWszStrat startup and oneclientleafsystem.cpp (1025) m_ShadowsInLeaf(an intermittent engine shadow assert seen before this change).Hitboxes: the server runs the same anim state and sets the player's angles to the feet yaw, so after 3 s a standing player's server-side body faces where they look, as in classic, instead of keeping the twist. Hitbox positions were not measured.
Not changed: the 90-degree limit and its fixed 90-degree step while the timer runs (classic's limit and step differ slightly: it follows to a 25-degree twist where neo leaves 30).
GIF (classic / master / this PR): case3-face-front.gif